import request from '@/utils/request'

// 查询信息发布列表
export function listInformation(query) {
  return request({
    url: '/carService/information/list',
    method: 'get',
    params: query
  })
}

// 查询信息发布详细
export function getInformation(riId) {
  return request({
    url: '/carService/information/' + riId,
    method: 'get'
  })
}

// 新增信息发布
export function addInformation(data) {
  return request({
    url: '/carService/information',
    method: 'post',
    data: data
  })
}

// 修改信息发布
export function updateInformation(data) {
  return request({
    url: '/carService/information',
    method: 'put',
    data: data
  })
}

// 删除信息发布
export function delInformation(riId) {
  return request({
    url: '/carService/information/' + riId,
    method: 'delete'
  })
}


//顶部搜索框
export function queryReleaseByLike(query) {
  return request({
    url: '/carService/information/likeQuery',
    method: 'get',
    params: query
  })
}

//根据审核状态查询发布信息
// 查询已审核的发布信息
export function queryReleaseUnCheck() {
  return request({
    url: '/carService/information/unCheck',
    method: 'get'
  })
}

// 查询待审核的发布信息
export function queryReleaseUnCheck1() {
  return request({
    url: '/carService/information/unCheck1',
    method: 'get'
  })
}
